<%@page trimDirectiveWhitespaces="true"%>
<%@page isErrorPage="true"%>
<%@page import="java.io.StringWriter"%>
<%@page import="java.io.PrintWriter"%>
<%@page import="fr.resasante.utils.PropertiesUtils"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<html>
<head>
<title>Oups ! (<%= pageContext.getErrorData().getStatusCode() %>)</title>
<link rel="stylesheet" type="text/css"
 href="<%=PropertiesUtils.getInstance().getProperty("statics.url")%>/css/style.css">
</head>
<body bgcolor="red">
 <div class="error_detected">
  <spring:message code="error.detected" />
 </div>
 <pre class="stacktrace">
 <% 
 	if ("true".equals(PropertiesUtils.getInstance().getProperty("debug"))) {
 		StringWriter sw = new StringWriter();
 		if (null != exception) {
 			exception.printStackTrace(new PrintWriter(sw));
 			String stacktrace = sw.toString();
 			out.print("\n\n\n\n\n" + stacktrace);
 		}
 	}
 %>
 </pre>
</body>
</html>